package it.polimi.TravelDream;

import java.math.BigInteger;
import java.util.Date;

import javax.validation.constraints.*;

import org.hibernate.validator.constraints.*;

public class UserDTO {
	
	@Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?",
            message="invalid email")
	private String email;
	
	@NotEmpty
    private String name;
	
	@NotEmpty
    private String surname;
	
	@NotEmpty
    private String password;
	
	@Digits(integer=10,fraction=0)
	@Range(min=0)
	private BigInteger telephone;
	
	@NotNull
	private Date birthday;
	
	private int ID;
     
    public String getName() {
        return name;
    }
     
    public void setName(String name) {
        this.name = name;
    }
  
    public String getSurname() {
        return surname;
    }
  
    public void setSurname(String surname) {
        this.surname = surname;
    }
  
    public String getEmail() {
        return email;
    } 
 
    public void setEmail(String email) {
        this.email = email;
    }
  
    public String getPassword() {
        return password;
    }
     
    public void setPassword(String password) {
        this.password = password;
    }
    
    public BigInteger getTelephone() {
        return telephone;
    }
    
    public void setTelephone(BigInteger telephone) {
    	this.telephone = telephone;
    }
    
    public Date getBirthday() {
        return birthday;
    }
    
    public void setBirthday(Date birthday) {
    	this.birthday = birthday;
    }
    
    public int getID() {
        return ID;
    }
    
    public void setID(int id) {
    	this.ID = id;
    }

}
